import request from '@/utils/http'

/**
 * 获取问答列表API
 *
 * @param params 查询参数对象
 * @returns 返回Promise对象，解析后为问答列表对象
 */
export const qaListApi = (params: any) => {
  return request.get('/api/qa', { params })
}

/**
 * 获取问答详情API
 *
 * @param qid 问答ID
 * @returns 返回Promise对象，解析后为问答详情对象
 */
export const qaDetailApi = (qid: string, action: string) => {
  return request.get(`/api/qa/${qid}?action=${action}`)
}
